<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
</head>
<body>
<input type="button" id="reg" value="点我注册">
<input type="button" id="login" value="点我登陆">
<input type="button" id="check" value="点我检测">
<div id="result" style="width: 100%; height: 100px">

</div>
</body>
<script>
    /*function flag(obj) {
        $.ajax({
            url:obj,
            type:"POST",
            success:function (data) {
                $("#result").html(data);
            }
        });
    }*/
    $(function () {
        $("#reg").click(function () {
            $.ajax({
                url:"test_reg.action",
                type:"POST",
                success:function (data) {
                    $("#result").html(data);
                }
            });
        });
        $("#login").click(function () {
            $.ajax({
                url:"test_login.action",
                type:"POST",
                success:function (data) {
                    $("#result").html(data);
                }
            });
        });
        $("#check").click(function () {
            $.ajax({
                url:"test_check.action",
                type:"POST",
                success:function (data) {
                    $("#result").html(data);
                }
            });
        });
    });

</script>
</html>